package com.sw.fastdev.activity;

import android.support.v7.app.AppCompatActivity;

import com.jaeger.library.StatusBarUtil;
import com.sw.fastdev.R;

/**
 * activity基类
 */
public abstract class BaseActivity extends AppCompatActivity {
    public int mAlpha = StatusBarUtil.DEFAULT_STATUS_BAR_ALPHA;
    public int mStatusBarColor = 0;

    @Override
    public void setContentView(int layoutResID) {
        super.setContentView(layoutResID);
        setStatusBar();
        initView();
        initData();
    }

    protected abstract void initView();

    protected abstract void initData();

    /**
     * 状态栏颜色设置
     */
    protected void setStatusBar() {
        StatusBarUtil.setColor(this, getResources().getColor(R.color.colorPrimary));
    }
}
